package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.domain.entity.SysNotification;
import com.ruoyi.system.mapper.SysNotificationMapper;
import com.ruoyi.system.service.ISysNotificationService;

/**
 * 通知Service业务层处理
 */
@Service
public class SysNotificationServiceImpl implements ISysNotificationService {
    @Autowired
    private SysNotificationMapper notificationMapper;

    /**
     * 查询通知
     *
     * @param notificationId 通知ID
     * @return 通知
     */
    @Override
    public SysNotification selectNotificationById(Long notificationId) {
        return notificationMapper.selectNotificationById(notificationId);
    }

    /**
     * 查询通知列表
     *
     * @param notification 通知
     * @return 通知集合
     */
    @Override
    public List<SysNotification> selectNotificationList(SysNotification notification) {
        return notificationMapper.selectNotificationList(notification);
    }

    /**
     * 新增通知
     *
     * @param notification 通知
     * @return 结果
     */
    @Override
    public int insertNotification(SysNotification notification) {
        return notificationMapper.insertNotification(notification);
    }

    /**
     * 修改通知
     *
     * @param notification 通知
     * @return 结果
     */
    @Override
    public int updateNotification(SysNotification notification) {
        return notificationMapper.updateNotification(notification);
    }

    /**
     * 批量删除通知
     *
     * @param notificationIds 需要删除的通知ID
     * @return 结果
     */
    @Override
    public int deleteNotificationByIds(Long[] notificationIds) {
        return notificationMapper.deleteNotificationByIds(notificationIds);
    }

    /**
     * 删除通知信息
     *
     * @param notificationId 通知ID
     * @return 结果
     */
    @Override
    public int deleteNotificationById(Long notificationId) {
        return notificationMapper.deleteNotificationById(notificationId);
    }
}